package cn.com.shopec.erp.system.vo;

import cn.com.shopec.erp.common.utils.UuidGenUtils;

/**
 * 
 * @ClassName RoleVo
 * @Description 角色Vo
 * @author chengui
 * @date 2013-5-30 下午4:30:28
 */
public class RoleVo {
	
	/** 主键. */
	private String id;
	/** 角色名称. */
	private String roleName;
	/** 角色编码. */
	private String roleCode;
	/** 角色类型:1-平台，2-供应商. */
	private int roleType;
	/** 备注. */
	private String remark;
	/** 权限ID集合. */
	private String menuStructures;
	/** 删除标识:0-已删除，1-未删除. */
	private int deleteFlag = 1;
	
	public RoleVo() {
		super();
	}
	public RoleVo(String id) {
		super();
		this.id = id;
	}
	public RoleVo(String id, String roleName, String roleCode, int roleType,
			String remark, String menuStructures, int deleteFlag) {
		super();
		this.id = id;
		this.roleName = roleName;
		this.roleCode = roleCode;
		this.roleType = roleType;
		this.remark = remark;
		this.menuStructures = menuStructures;
		this.deleteFlag = deleteFlag;
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getRoleName() {
		return UuidGenUtils.filterDecode(roleName);
	}
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}
	public String getRoleCode() {
		return roleCode;
	}
	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}
	public int getRoleType() {
		return roleType;
	}
	public void setRoleType(int roleType) {
		this.roleType = roleType;
	}
	public String getRemark() {
		return UuidGenUtils.filterDecode(remark);
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getMenuStructures() {
		return menuStructures;
	}
	public void setMenuStructures(String menuStructures) {
		this.menuStructures = menuStructures;
	}
	public int getDeleteFlag() {
		return deleteFlag;
	}
	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RoleVo other = (RoleVo) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
}
